import django_filters
from .models import *


class SkuFilter(django_filters.rest_framework.FilterSet):
    """过滤器"""

    itemCate = django_filters.CharFilter(field_name='item__cate')
    itemActivity = django_filters.CharFilter(field_name='item__activity')
    specValue = django_filters.CharFilter(field_name='specValues', lookup_expr='icontains')
    class Meta:
        model = Sku
        fields = '__all__'
